module.exports = app => {
    const mongoose = app.mongoose;
    const Schema = mongoose.Schema;

    const OrderSchema = new Schema({
        orderName: { type: String, required: true },
        price: { type: String, required: true },
        desc: { type: String },
        state: { type: Number,
                default: 1
            },
        createTime: {
            type: Date,
            default: Date.now
        }
    });

    return mongoose.model('Order', OrderSchema);
}